<template>
  <NuxtLayout name="account">
    <el-tabs v-model="type" @tab-click="handleTabClick">
      <el-tab-pane v-for="(item, index) in tabPanes" :key="index" :label="item.label" :name="item.type">
        {{ item }}
      </el-tab-pane>
    </el-tabs>
  </NuxtLayout>
</template>
<script setup>
  const type = ref(1)
  function handleTabClick(tab) {
    type.value = tab.props.name
  }

  const tabPanes = [
    {
      label: '我的错题',
      type: 1
    },
    {
      label: '我的收藏',
      type: 2
    }
  ]
</script>
<style lang="scss" scoped></style>
